<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script>
    var num1 =prompt ('第一个值:'); 
    var num2 =prompt('第二个值：');
    //prompt 输出为字符串型的  然后用ParseFloat 转换为数值型
    var result =parseFloat (num1)+parseFloat (num2);    
    alert('你的结果是'+result);
    
    </script>
</head>
<body>
    

    
</body>
</html>